import base64
import re

with open("1.txt","rb") as f:
    s=f.read()
base16dic=r'^[A-F0-9=]*$'
base32dic=r'^[A-Z2-7=]*$'
base64dic=r'^[A-Za-z0-9/+=]*$'
n=0
while 1:
    n+=1
    t=s.decode()
    if "{" in t:
        print(t)
        break
    elif re.match(base16dic,t):
        s=base64.b16decode(s)
    elif re.match(base32dic,t):
        s=base64.b32decode(s)
    elif re.match(base64dic,t):
        s=base64.b64decode(s)
        